package 第四章;

public class PC {
    CPU cpu;
    HardDisk HD;
    void setCPU(CPU c){
        this.cpu=c;
    }
    void setHardDisk(HardDisk h){
        this.HD=h;
    }
    void show(){
        System.out.println("CPU的速度为"+cpu.getSpeed());
        System.out.println("硬盘的容量为"+HD.getAmount());
    }
}
